<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <title>分类列表</title>
    {include file="public/resource/layui_css" /}
</head>
<body>
<!-- 内容主体区域 -->
<div style="padding: 15px;">
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
        <legend>分类列表</legend>
    </fieldset>
    <table class="layui-table" lay-even>
        <thead>
        <tr>
            <th>ID</th>
            <th>名称</th>
            <th>英文名称</th>
            <th>排序</th>
            <th>添加时间</th>
            <th>管理</th>
        </tr>
        </thead>
        <tbody>
        {volist name='list' id='one'}
        <tr>
            <td>{$one.id}</td>
            <td><a href="/category/{$one.id}.html" target="_blank">{$one.name}</a></td>
            <td>{$one.en_name}</td>
            <td>{$one.sort}</td>
            <td>{$one.created_time}</td>
            <td>
                <div class="operate">
                    <a href="javascript:;" class="layui-btn layui-btn-xs" data-method="edit" lay-event="edit"
                       data-id="{$one.id}"><i class="layui-icon">&#xe642;</i></a>
                    <a href="javascript:;" class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"
                       data-method="delete" data-id="{$one.id}" data-name={$one.name}"><i
                            class="layui-icon">&#xe640;</i></a>
                </div>
            </td>
        </tr>
        {volist name='one.childrenList' id='item'}
        <tr>
            <td>{$item.id}</td>
            <td>&nbsp; <a href="/category/{$item.id}.html" target="_blank">| - {$item.name}</a></td>
            <td>{$item.en_name}</td>
            <td>{$item.sort}</td>
            <td>{$item.created_time}</td>
            <td>
                <div class="operate">
                    <a href="javascript:;" class="layui-btn layui-btn-xs" data-method="edit" lay-event="edit"
                       data-id="{$item.id}"><i class="layui-icon">&#xe642;</i></a>
                    <a href="javascript:;" class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"
                       data-method="delete" data-id="{$item.id}" data-name={$item.name}"><i
                            class="layui-icon">&#xe640;</i></a>
                </div>
            </td>
        </tr>
        {/volist}
        {/volist}
        </tbody>
    </table>
</div>
{include file="public/resource/layui_js" /}
<script type="text/javascript">
    let module = "category", moduleName= "分类";
</script>
<script src="/static/js/common.js"></script>
</body>
</html>